package com.example.myproject.fragment.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;

/**
 * Created by Administrator on 2018/3/23 0023.
 */

public class HomeRecylerAdapter extends RecyclerView.Adapter<HomeRecylerAdapter.HomeViewHolder> {
    private Context context;

    @Override
    public HomeViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        HomeViewHolder holder = null;
        switch (viewType) {
            case 0:
                holder = new TitleViewHolder(new View(context));
                break;
            default:
                Log.i("tags", "未标记item");
                break;
        }
        return holder;
    }

    @Override
    public void onBindViewHolder(HomeViewHolder holder, int position) {
        if (holder instanceof TitleViewHolder) {

        }
    }

    @Override
    public int getItemViewType(int position) {
        switch (position) {
            case 0:

                break;
            case 1:

                break;
            case 2:

                break;
            default:

                break;
        }
        return super.getItemViewType(position);
    }

    @Override
    public int getItemCount() {
        return 0;
    }

    public abstract class HomeViewHolder extends RecyclerView.ViewHolder {

        public HomeViewHolder(View itemView) {
            super(itemView);
        }
    }

    public class TitleViewHolder extends HomeViewHolder {

        public TitleViewHolder(View itemView) {
            super(itemView);
        }
    }

}
